<template>
	<view class="group-item" @click="showGroupInfo()">
		<head-image :name="group.showGroupName" :url="group.headImage" :size="90"></head-image>
		<view class="group-name">
			<view>{{ group.showGroupName }}</view>
		</view>
	</view>
</template>

<script>
	import {
		number
	} from '../../uni_modules/uview-plus/libs/function/test'
	export default {
		name: "group-item",
		data() {
			return {}
		},
		methods: {
			showGroupInfo() {
				uni.navigateTo({
					url: `/pageSubOne/group/group-info?id=${this.group.id}&sourceType=${this.sourceType}`
				})
			},
		},
		props: {
			group: {
				type: Object
			},
			sourceType: {
				type: Number
			}
		}
	}
</script>

<style scope lang="scss">
	.group-item {
		height: 100rpx;
		display: flex;
		margin-bottom: 1rpx;
		position: relative;
		padding: 10rpx;
		padding-left: 20rpx;
		align-items: center;
		background-color: white;
		white-space: nowrap;

		&:hover {
			background-color: #f5f6ff;
		}

		.group-name {
			font-size: 32rpx;
			padding-left: 20rpx;
			font-weight: 600;
			text-align: left;
			white-space: nowrap;
			overflow: hidden;
		}
	}
</style>